Xbasic
Array append_arrays_filtered Method
Syntax
V <array>.append_arrays_filtered(P array1 , C filter1 [,P array2, C filter2 [,P arrayN,C filter3]])
Arguments
- array1Pointer
The first array.
- filter1Character
A character filter expression that selects elements from array1.
- array2Pointer
The second array.
- filter2Character
A character filter expression that selects elements from array2. Required if a second array is specified.
- arrayNPointer
An additional array to append. You can append as many arrays as you'd like by specifying additional array filter pairs as parameters.
- filter3Character
A character filter expression that selects elements from arrayN. Required for each additional array specified.
Description
Appends one or more filtered arrays to an array.
Discussion
The <array>.append_arrays_filtered() method selects elements from the specified arrays and merges them to produce New_Array. All arrays must be single dimensional and have identical structures to use this method.
Example
dim cars[10] as P cars.initialize_properties("manufacturer|model",<<%str% Ford|Taurus Ford|Focus GM|Malibu Dodge|Status %str%) dim trucks[10] as P trucks.initialize_properties("manufacturer|model",<<%str% Ford|F-150 Ford|Ranger Dodge|Dakota %str%) dim vehicles[2] as P vehicles.append_arrays_filtered(cars,"manufacturer='Ford'",trucks,"manufacturer='Ford'") ? vehicles.dump_properties("manufacturer model") = Ford Taurus Ford Focus Ford F-150 Ford Ranger